package com.ciwong.epaper.common.guidedialog;

import android.content.Context;

import com.airbnb.lottie.LottieAnimationView;
import com.ciwong.epaper.R;

/**
 * 倒计时
 * Created by lzr on 2017/4/19.
 */
public class CountDownDialog extends BaseGuideLayerDialog {
    private static final String TAG = "CountDownDialog";
    private CountInterFace      countInterFace;
    private LottieAnimationView mLottieAnimationView;
    public CountDownDialog(Context context, CountInterFace countInterFace) {
        super(context, R.style.read_choose_dialog);
        this.countInterFace = countInterFace;
        setContentView(R.layout.count_down_layout);
        mLottieAnimationView = findViewById(R.id.animation_view);
        mLottieAnimationView.playAnimation();

    }


    @Override
    public void dismiss() {

        try {
            super.dismiss();
        } catch (IllegalArgumentException e) {

        }finally {
            if (countInterFace != null) {
                countInterFace.close();
            }
        }

    }
    public interface CountInterFace {
        void close();
    }
}